{include file="public_head"}

<!--CSS-->
<style>
  label{  float: left;  font-size: 18px;  line-height: 50px;  margin-bottom: 0;  font-family: '微软雅黑';  }
  #password {  width: 460px;  display: block;  font-size: 16px;  line-height: 50px;  border-radius: 4px;  text-indent: 15px;  border: 1px solid #CBCBCB;  float: left;  margin-left: 15px;  margin-right: 20px;  }
  #aa{  width: 160px;  height: 50px;  display: block;  margin-left: 20px;  font-size: 22px;  font-family: '微软雅黑';  color: white;  border: none;  background: #E73E08;  border-radius: 6px;  }
</style>
<!--CSS-->

<!--菜单-->
<div class="header-det">
  <div>
    <!--<span><a href="#"><img src="__STATIC__/img/logo85.png"></a></span>-->
    {include file="public_menu"}
  </div>
</div>
<!--菜单-->

<!--支付密码-->
<div class="center-settle" style="height: 500px;">

  <div style="margin-left: 400px;margin-top: 100px;">
    <h2>保证金金额：{$bond.bond}元</h2>
    <br>
    <form action="" method="post">
      <label>支付密码：</label>
      <input type="password" id="password" value="">
      <input type="button" value="支付" onclick="payment()" id="aa">
    </form>
  </div>
</div>
<!--支付密码-->

<script>

  // 余额支付保证金
  function payment() {
    var password = $('#password').val();

    $.ajax({

      url: "{:url('shop/bond/balance')}",
      dateType: 'json',
      type: 'post',
      data: {'password': password,'goods_id': "{$bond['id']}",'price':"{$bond.bond}"},

      success: function (t) {
        if (t.code == 200) {

          layer.msg('支付成功,正在跳转中！');

          setTimeout(function () {

            layer.closeAll('loading');

            // 跳转页面
            location.href = "{:url('shop/auction/good_detail')}?id="+"{$bond['id']}";

          }, 1000);

        } else {
          layer.msg(t.message);
        }
      }

    });
  }

</script>

{include file="public_foot"}